

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pywinauto.tests.translation &mdash; pywinauto v0.4.1 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.4.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="pywinauto v0.4.1 documentation" href="../index.html" />
    <link rel="up" title="Main user modules" href="code.html" />
    <link rel="next" title="pywinauto.tests.truncation" href="pywinauto.tests.truncation.html" />
    <link rel="prev" title="pywinauto.tests.repeatedhotkey" href="pywinauto.tests.repeatedhotkey.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pywinauto.tests.truncation.html" title="pywinauto.tests.truncation"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="pywinauto.tests.repeatedhotkey.html" title="pywinauto.tests.repeatedhotkey"
             accesskey="P">previous</a> |</li>
        <li><a href="../contents.html">pywinauto v0.4.1 documentation</a> &raquo;</li>
          <li><a href="code.html" accesskey="U">Main user modules</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="pywinauto-tests-translation">
<h1>pywinauto.tests.translation<a class="headerlink" href="#pywinauto-tests-translation" title="Permalink to this headline">¶</a></h1>
<blockquote>
<div><span class="target" id="module-pywinauto.tests.translation"></span><p>Translation Test</p>
<p><strong>What is checked</strong>
This checks for controls which appear not to be translated.</p>
<p><strong>How is it checked</strong>
It compares the text of the localised and reference controls.</p>
<p>If there are more than string in the control then each item is searched for in
the US list of titles (so checking is not order dependent).
The indices for the untranslated strings are returned in a comma separated
string.
Also the untranslated strings themselves are returned (all as one string).
These strings are not escaped and are delimited as
&#8220;string1&#8221;,&#8221;string2&#8221;,...&#8221;stringN&#8221;.</p>
<p><strong>When is a bug reported</strong></p>
<blockquote>
<div>If the text of the localised control is identical to the reference control
(in case, spacing i.e.  a binary compare) then it will be flagged as
untranslated. Otherwise the control is treated as translated.</div></blockquote>
<p>Note: This is the method to return the least number of bugs. If there are
differences in any part of the string (e.g. a path or variable name) but the
rest of the string is untranslated then a bug will not be highlighted</p>
<p><strong>Bug Extra Information</strong>
The bug contains the following extra information
Name    Description
Strings         The list of the untranslated strings as explained above
StringIndices           The list of indices (0 based) that are untranslated.
This will usually be 0 but if there are many strings in the control
untranslated it will report ALL the strings e.g. 0,2,5,19,23</p>
<p><strong>Is Reference dialog needed</strong>
The reference dialog is always necessary.</p>
<p><strong>False positive bug reports</strong>
False positive bugs will be reported in the following cases.
-       The title of the control stays the same as the US because the
translation is the same as the English text(e.g. Name: in German)
-       The title of the control is not displayed (and not translated).
This can sometimes happen if the programmer displays something else on the
control after the dialog is created.</p>
<p><strong>Test Identifier</strong>
The identifier for this test/bug is &#8220;Translation&#8221;</p>
<dl class="function">
<dt id="pywinauto.tests.translation.TranslationTest">
<tt class="descclassname">pywinauto.tests.translation.</tt><tt class="descname">TranslationTest</tt><big>(</big><em>windows</em><big>)</big><a class="headerlink" href="#pywinauto.tests.translation.TranslationTest" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns just one bug for each control</p>
</dd></dl>

</div></blockquote>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="pywinauto.tests.repeatedhotkey.html"
                        title="previous chapter">pywinauto.tests.repeatedhotkey</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="pywinauto.tests.truncation.html"
                        title="next chapter">pywinauto.tests.truncation</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/code/pywinauto.tests.translation.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pywinauto.tests.truncation.html" title="pywinauto.tests.truncation"
             >next</a> |</li>
        <li class="right" >
          <a href="pywinauto.tests.repeatedhotkey.html" title="pywinauto.tests.repeatedhotkey"
             >previous</a> |</li>
        <li><a href="../contents.html">pywinauto v0.4.1 documentation</a> &raquo;</li>
          <li><a href="code.html" >Main user modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Mark Mc Mahon.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>